<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
    <meta charset="UTF-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>交易流水</title>
    <link rel="stylesheet" type="text/css" href="css/list-style.css"/>
    <link rel="stylesheet" type="text/css" href="css/nav1.css">
</head>
<body>
<nav class="mynav">
    <ul>
        <li><a href="" onclick="window.open('index.html')">首 &nbsp 页</a></li>
        <li><a href="" onclick="window.open('bankcardlist.html')">我的银行卡</a></li>
        <li><a href="" onclick="window.open('deallist.html')">我的流水</a></li>
        <li><a href="" onclick="window.open('applydebitcard.html')">申请借记卡</a></li>
        <li><a href="" onclick="window.open('personalcenter.html')">个人中心</a></li>
        <li><a href="" onclick="window.open('helpandsupport.html')">帮助与支持</a></li>
    </ul>
</nav>
<span class="target"></span>

<!--流水列表-->
<div class="container">
    <div class="component">
        <table class="table">
            <thead>
            <tr>
                <th>登录时间</th>
                <th>登录IP地址</th>

            </tr>
            </thead >
            <tbody name="loginhistory" id="loginhistory">
            <tr>
                <td class="card_id">2020.7.8 12:09</td>
                <td class="deal_money">127.0.0.1</td>
            </tr>
            </tbody>
        </table>
    </div>
</div>
<!--//流水列表-->
<script src="js/jquery.min.js"></script>
<script src="js/nav1.js"></script>
<script type="text/javascript">
		var data={
				"pageNum":0,
			};
    $.ajax({
        url: "http://www.longm.top:8080/lm/getUserLoginHistory",
        type: "POST",
        dataType:"json",
        headers:{
            'Content-Type':'application/json',
            "token":window.localStorage.getItem("token")
        },
        cache: false,
        async: false,
        contentType: "application/x-www-form-urlencoded",
        data: JSON.stringify(data),
        success: function (res) {
			if (res.code === 200) {
				console.log(JSON.stringify(res));
				var result = res.data.list;
				for (var i = 0; i < result.length; i++) {
				    $('#loginhistory').append(
						"<tr>"+
							"<td class='card_id'>"+result[i].logintime+"</td>"+
							"<td class='deal_time'>"+result[i].loginip+"</td>"+
						"</tr>")
				}
			}
			
        }
    });
</script>
</body>
</html>